import { useState, useEffect } from 'react';

export default function useRefresh() {
  const [refs, setRefs] = useState(false);
  useEffect(() => {
    refs && setTimeout(() => setRefs(false));
  }, [refs]);
  return () => setRefs(true);
}
